"""
Copyright (C) 2018-2019  Jesse Martinez, Lefan Zhang, Weijia He, Noah Brackenbury

iot-tap-backend is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

iot-tap-backend is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with iot-tap-backend.  If not, see <https://www.gnu.org/licenses/>.
"""

rule_user_task_list = [
    ('p1', 2, 2),
    ('p1', 9, 1),
    ('p1', 11, 3),
    ('p1', 12, 3),
    ('p1', 15, 2),
    ('p1', 16, 1),
    ('p2', 2, 4),
    ('p2', 3, 3),
    ('p2', 4, 3),
    ('p2', 7, 4),
    ('p2', 12, 3),
    ('p2', 14, 3),
    ('p2', 16, 2),
    ('p3', 2, 2),
    ('p3', 5, 4),
    ('p3', 6, 4),
    ('p3', 12, 2),
    ('p3', 14, 2),
    ('p3', 15, 3),
    ('p3', 16, 2),
    ('p6', 4, 4),
    ('p6', 6, 1),
    ('p6', 7, 1),
    ('p6', 10, 2),
    ('p6', 11, 4),
    ('p6', 14, 2),
    ('p6', 15, 1),
    ('p10', 2, 4),
    ('p10', 5, 2),
    ('p10', 9, 3),
    ('p10', 11, 4),
    ('p10', 12, 3),
    ('p10', 14, 3),
    ('p10', 16, 2),
    ('p13', 2, 4),
    ('p13', 3, 4),
    ('p13', 4, 4),
    ('p13', 6, 4),
    ('p13', 7, 4),
    ('p13', 8, 3),
    ('p13', 16, 4),
    ('p14', 2, 4),
    ('p14', 4, 3),
    ('p14', 7, 3),
    ('p14', 10, 4),
    ('p14', 11, 4),
    ('p14', 14, 1),
    ('p14', 15, 1),
    ('p18', 2, 4),
    ('p18', 3, 3),
    ('p18', 4, 4),
    ('p18', 10, 4),
    ('p18', 14, 4),
    ('p18', 15, 3),
    ('p18', 16, 4),
    ('p19', 3, 3),
    ('p19', 6, 1),
    ('p19', 9, 2),
    ('p19', 10, 1),
    ('p19', 11, 4),
    ('p19', 12, 3),
    ('p19', 15, 2),
    ('p21', 2, 2),
    ('p21', 5, 3),
    ('p21', 7, 4),
    ('p21', 8, 3),
    ('p21', 11, 4),
    ('p21', 12, 2),
    ('p21', 15, 2),
    ('p22', 3, 3),
    ('p22', 5, 4),
    ('p22', 6, 3),
    ('p22', 9, 4),
    ('p22', 12, 3),
    ('p22', 15, 3),
    ('p22', 16, 2),
    ('p23', 3, 3),
    ('p23', 6, 1),
    ('p23', 7, 2),
    ('p23', 8, 3),
    ('p23', 11, 4),
    ('p23', 12, 3),
    ('p23', 16, 3),
    ('p25', 2, 4),
    ('p25', 3, 2),
    ('p25', 7, 4),
    ('p25', 10, 2),
    ('p25', 11, 4),
    ('p25', 12, 1),
    ('p25', 16, 2),
    ('p27', 2, 2),
    ('p27', 4, 3),
    ('p27', 7, 1),
    ('p27', 9, 3),
    ('p27', 10, 3),
    ('p27', 12, 1),
    ('p27', 16, 1),
    ('p28', 2, 3),
    ('p28', 4, 4),
    ('p28', 7, 4),
    ('p28', 9, 3),
    ('p28', 10, 4),
    ('p28', 12, 2),
    ('p28', 14, 1),
    ('p29', 5, 4),
    ('p29', 7, 2),
    ('p29', 8, 3),
    ('p29', 9, 3),
    ('p29', 11, 4),
    ('p29', 12, 3),
    ('p29', 16, 2),
    ('p30', 2, 4),
    ('p30', 3, 2),
    ('p30', 4, 3),
    ('p30', 5, 3),
    ('p30', 14, 3),
    ('p30', 15, 2),
    ('p30', 16, 4),
    ('p33', 3, 4),
    ('p33', 5, 4),
    ('p33', 7, 2),
    ('p33', 10, 4),
    ('p33', 11, 4),
    ('p33', 12, 3),
    ('p33', 16, 2),
    ('p34', 2, 3),
    ('p34', 3, 3),
    ('p34', 7, 3),
    ('p34', 8, 2),
    ('p34', 9, 3),
    ('p34', 11, 4),
    ('p34', 12, 3),
    ('p37', 5, 3),
    ('p37', 6, 2),
    ('p37', 8, 2),
    ('p37', 10, 4),
    ('p37', 11, 4),
    ('p37', 12, 3),
    ('p37', 15, 2),
    ('p38', 3, 3),
    ('p38', 4, 3),
    ('p38', 5, 4),
    ('p38', 6, 1),
    ('p38', 10, 4),
    ('p38', 11, 4),
    ('p38', 12, 3),
    ('p40', 3, 3),
    ('p40', 6, 4),
    ('p40', 7, 4),
    ('p40', 8, 3),
    ('p40', 11, 4),
    ('p40', 12, 3),
    ('p40', 16, 3),
    ('p44', 2, 3),
    ('p44', 3, 3),
    ('p44', 4, 4),
    ('p44', 9, 2),
    ('p44', 10, 4),
    ('p44', 12, 3),
    ('p44', 14, 1),
    ('p50', 3, 2),
    ('p50', 7, 1),
    ('p50', 8, 3),
    ('p50', 11, 3),
    ('p50', 12, 2),
    ('p50', 14, 3),
    ('p50', 16, 2),
]

property_user_task_list = [
    ('p4', 8, 2),
    ('p4', 10, 4),
    ('p4', 11, 4),
    ('p4', 12, 4),
    ('p4', 14, 4),
    ('p4', 15, 1),
    ('p4', 16, 4),
    ('p5', 2, 4),
    ('p5', 3, 3),
    ('p5', 4, 3),
    ('p5', 5, 4),
    ('p5', 7, 4),
    ('p5', 11, 4),
    ('p5', 14, 4),
    ('p7', 3, 4),
    ('p7', 6, 4),
    ('p7', 8, 2),
    ('p7', 9, 2),
    ('p7', 14, 3),
    ('p7', 15, 3),
    ('p7', 16, 4),
    ('p8', 2, 4),
    ('p8', 5, 4),
    ('p8', 6, 4),
    ('p8', 7, 4),
    ('p8', 11, 4),
    ('p8', 14, 4),
    ('p8', 16, 4),
    ('p9', 4, 4),
    ('p9', 6, 4),
    ('p9', 7, 4),
    ('p9', 8, 3),
    ('p9', 12, 1),
    ('p9', 15, 2),
    ('p9', 16, 4),
    ('p11', 4, 4),
    ('p11', 5, 4),
    ('p11', 6, 4),
    ('p11', 8, 1),
    ('p11', 9, 4),
    ('p11', 11, 4),
    ('p11', 14, 2),
    ('p12', 4, 4),
    ('p12', 7, 3),
    ('p12', 9, 4),
    ('p12', 11, 4),
    ('p12', 14, 4),
    ('p12', 15, 2),
    ('p12', 16, 2),
    ('p15', 4, 4),
    ('p15', 6, 4),
    ('p15', 10, 4),
    ('p15', 12, 4),
    ('p15', 14, 4),
    ('p15', 15, 3),
    ('p15', 16, 4),
    ('p16', 2, 4),
    ('p16', 3, 3),
    ('p16', 4, 4),
    ('p16', 7, 4),
    ('p16', 8, 3),
    ('p16', 11, 4),
    ('p16', 15, 2),
    ('p17', 2, 4),
    ('p17', 3, 3),
    ('p17', 7, 4),
    ('p17', 8, 2),
    ('p17', 10, 4),
    ('p17', 11, 4),
    ('p17', 16, 4),
    ('p20', 4, 4),
    ('p20', 6, 2),
    ('p20', 7, 4),
    ('p20', 8, 2),
    ('p20', 9, 4),
    ('p20', 11, 4),
    ('p20', 14, 4),
    ('p24', 3, 3),
    ('p24', 7, 4),
    ('p24', 8, 3),
    ('p24', 10, 4),
    ('p24', 11, 4),
    ('p24', 12, 4),
    ('p24', 14, 4),
    ('p26', 6, 4),
    ('p26', 8, 3),
    ('p26', 9, 4),
    ('p26', 12, 3),
    ('p26', 14, 4),
    ('p26', 15, 2),
    ('p26', 16, 3),
    ('p31', 3, 4),
    ('p31', 5, 4),
    ('p31', 6, 4),
    ('p31', 7, 4),
    ('p31', 9, 3),
    ('p31', 15, 3),
    ('p31', 16, 4),
    ('p32', 4, 4),
    ('p32', 7, 4),
    ('p32', 9, 3),
    ('p32', 10, 4),
    ('p32', 11, 4),
    ('p32', 14, 4),
    ('p32', 15, 1),
    ('p35', 2, 3),
    ('p35', 4, 2),
    ('p35', 7, 4),
    ('p35', 9, 3),
    ('p35', 11, 4),
    ('p35', 14, 2),
    ('p35', 15, 1),
    ('p36', 3, 4),
    ('p36', 7, 4),
    ('p36', 9, 4),
    ('p36', 11, 4),
    ('p36', 12, 4),
    ('p36', 14, 4),
    ('p36', 16, 4),
    ('p39', 2, 2),
    ('p39', 3, 4),
    ('p39', 5, 4),
    ('p39', 8, 3),
    ('p39', 11, 4),
    ('p39', 12, 2),
    ('p39', 16, 4),
    ('p41', 4, 4),
    ('p41', 5, 4),
    ('p41', 6, 4),
    ('p41', 8, 3),
    ('p41', 11, 4),
    ('p41', 14, 4),
    ('p41', 16, 4),
    ('p42', 2, 3),
    ('p42', 3, 4),
    ('p42', 5, 4),
    ('p42', 8, 1),
    ('p42', 10, 4),
    ('p42', 11, 4),
    ('p42', 12, 4),
    ('p43', 5, 4),
    ('p43', 6, 4),
    ('p43', 7, 4),
    ('p43', 11, 4),
    ('p43', 12, 4),
    ('p43', 15, 1),
    ('p43', 16, 4),
    ('p45', 3, 4),
    ('p45', 7, 3),
    ('p45', 9, 2),
    ('p45', 11, 3),
    ('p45', 14, 1),
    ('p45', 15, 2),
    ('p45', 16, 1),
    ('p46', 5, 4),
    ('p46', 6, 1),
    ('p46', 8, 3),
    ('p46', 9, 3),
    ('p46', 11, 4),
    ('p46', 12, 4),
    ('p46', 16, 1),
    ('p47', 4, 3),
    ('p47', 7, 4),
    ('p47', 9, 4),
    ('p47', 10, 4),
    ('p47', 11, 4),
    ('p47', 14, 2),
    ('p47', 15, 1),
    ('p48', 4, 4),
    ('p48', 6, 4),
    ('p48', 8, 3),
    ('p48', 10, 4),
    ('p48', 11, 4),
    ('p48', 12, 2),
    ('p48', 15, 3),
    ('p49', 2, 4),
    ('p49', 6, 4),
    ('p49', 7, 4),
    ('p49', 8, 1),
    ('p49', 12, 4),
    ('p49', 15, 3),
    ('p49', 16, 4),
    ('p51', 2, 4),
    ('p51', 3, 3),
    ('p51', 5, 4),
    ('p51', 7, 4),
    ('p51', 14, 4),
    ('p51', 15, 1),
    ('p51', 16, 2),
]

correct_property_user_task_list = [
    ('p4', 10, 4),
    ('p4', 11, 4),
    ('p4', 12, 4),
    ('p4', 14, 4),
    ('p4', 16, 4),
    ('p5', 2, 4),
    ('p5', 5, 4),
    ('p5', 7, 4),
    ('p5', 11, 4),
    ('p5', 14, 4),
    ('p7', 3, 4),
    ('p7', 6, 4),
    ('p7', 16, 4),
    ('p8', 2, 4),
    ('p8', 5, 4),
    ('p8', 6, 4),
    ('p8', 7, 4),
    ('p8', 11, 4),
    ('p8', 14, 4),
    ('p8', 16, 4),
    ('p9', 4, 4),
    ('p9', 6, 4),
    ('p9', 7, 4),
    ('p9', 16, 4),
    ('p11', 4, 4),
    ('p11', 5, 4),
    ('p11', 6, 4),
    ('p11', 9, 4),
    ('p11', 11, 4),
    ('p12', 4, 4),
    ('p12', 9, 4),
    ('p12', 11, 4),
    ('p12', 14, 4),
    ('p15', 4, 4),
    ('p15', 6, 4),
    ('p15', 10, 4),
    ('p15', 12, 4),
    ('p15', 14, 4),
    ('p15', 16, 4),
    ('p16', 2, 4),
    ('p16', 4, 4),
    ('p16', 7, 4),
    ('p16', 11, 4),
    ('p17', 2, 4),
    ('p17', 7, 4),
    ('p17', 10, 4),
    ('p17', 11, 4),
    # ('p17', 16, 4),
    ('p20', 4, 4),
    ('p20', 7, 4),
    ('p20', 9, 4),
    ('p20', 11, 4),
    ('p20', 14, 4),
    ('p24', 7, 4),
    ('p24', 10, 4),
    ('p24', 11, 4),
    ('p24', 12, 4),
    ('p24', 14, 4),
    ('p26', 6, 4),
    ('p26', 9, 4),
    ('p26', 14, 4),
    ('p31', 3, 4),
    ('p31', 5, 4),
    ('p31', 6, 4),
    ('p31', 7, 4),
    ('p31', 16, 4),
    ('p32', 4, 4),
    ('p32', 7, 4),
    ('p32', 10, 4),
    ('p32', 11, 4),
    ('p32', 14, 4),
    ('p35', 7, 4),
    ('p35', 11, 4),
    ('p36', 3, 4),
    ('p36', 7, 4),
    ('p36', 9, 4),
    ('p36', 11, 4),
    ('p36', 12, 4),
    ('p36', 14, 4),
    ('p36', 16, 4),
    ('p39', 3, 4),
    ('p39', 5, 4),
    ('p39', 11, 4),
    ('p39', 16, 4),
    ('p41', 4, 4),
    ('p41', 5, 4),
    ('p41', 6, 4),
    ('p41', 11, 4),
    ('p41', 14, 4),
    ('p41', 16, 4),
    ('p42', 3, 4),
    ('p42', 5, 4),
    ('p42', 10, 4),
    ('p42', 11, 4),
    ('p42', 12, 4),
    ('p43', 5, 4),
    ('p43', 6, 4),
    ('p43', 7, 4),
    ('p43', 11, 4),
    ('p43', 12, 4),
    ('p43', 16, 4),
    ('p45', 3, 4),
    ('p46', 5, 4),
    ('p46', 11, 4),
    ('p46', 12, 4),
    ('p47', 7, 4),
    ('p47', 9, 4),
    ('p47', 10, 4),
    ('p47', 11, 4),
    ('p48', 4, 4),
    ('p48', 6, 4),
    ('p48', 10, 4),
    ('p48', 11, 4),
    # ('p49', 2, 4),
    ('p49', 6, 4),
    ('p49', 7, 4),
    ('p49', 12, 4),
    ('p49', 16, 4),
    ('p51', 2, 4),
    ('p51', 5, 4),
    ('p51', 7, 4),
    ('p51', 14, 4),
]

mutated_rule_user_task_list = [
    ('mutate', 1),
    ('mutate', 2),
    ('mutate', 3),
    ('mutate', 4),
    ('mutate', 5),
    ('mutate', 6),
    ('mutate', 7),
    ('mutate', 8),
    ('mutate', 9),
    ('mutate', 10),
    ('mutate', 11),
    ('mutate', 12),
    ('mutate', 13),
    ('mutate', 14),
    ('mutate', 15),
    ('mutate', 16),
    ('mutate', 17),
    ('mutate', 18),
    ('mutate', 19),
    ('mutate', 20),
    ('mutate', 21),
    ('mutate', 22),
    ('mutate', 23),
    ('mutate', 24),
    ('mutate', 25),
    ('mutate', 26),
]

multiple_property_user_task_list = [
    ('multiple', 1),
    ('multiple', 2),
    ('multiple', 3),
    ('multiple', 4),
    ('multiple', 5),
    ('multiple', 6),
    ('multiple', 7),
]

task_ltl_dict = {
    2: '!F(living_room_window.openclose_window_position=false & bedroom_window.openclose_window_position=false & '
       'bathroom_window.openclose_window_position=false)',
    3: 'G(!(location_sensor.kitchen_bobbie=true) | (smart_oven.lockunlock_setting=true))',
    4: 'G(!thermostat.thermostat_temperature>80)',
    5: 'G(!smart_refrigerator.temperature_control_temperature<40)',
    6: '!F(120*smart_refrigerator.openclose_door_position=true)',
    7: '!F(15*smart_faucet.water_onoff_setting=true)',
    8: 'G(!(!thermostat.current_temperature_temperature>80 & !thermostat.current_temperature_temperature<60 & '
       'weather_sensor.is_it_raining_condition=false) | bedroom_window.openclose_window_position=true) & '
       '!F(thermostat.current_temperature_temperature>80 & bedroom_window.openclose_window_position=true) '
       '& !F(thermostat.current_temperature_temperature<60 & bedroom_window.openclose_window_position=true) '
       '& !F(weather_sensor.is_it_raining_condition=true & bedroom_window.openclose_window_position=true)',
    9: 'G(!(location_sensor.home_anyone=true) | '
       '(thermostat.thermostat_temperature<75 & thermostat.thermostat_temperature>70))',
    10: '!F(bathroom_window.openclose_curtains_position=true)',
    11: '!F(amazon_echo.genre_genre=Pop)',
    12: '!F(living_room_window.openclose_curtains_position=true & roomba.power_onoff_setting=true) & '
        '!F(bedroom_window.openclose_curtains_position=true & roomba.power_onoff_setting=true) & '
        '!F(bathroom_window.openclose_curtains_position=true & roomba.power_onoff_setting=true) ',
    14: 'G(!(fitbit.sleep_sensor_status=true) | front_door_lock.lockunlock_setting=true)',
    15: '!F(@roomba.power_onoff_setting=true & 10800#location_sensor.home_a_guest=true)',
    16: 'G(!(@fitbit.sleep_sensor_status=true & smart_tv.power_onoff_setting=true) | '
        '(1800#fitbit.sleep_sensor_status=true W @smart_tv.power_onoff_setting=false))',
}
